package com.itheima.scan.beans;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("wuya")
@Scope("prototype")
public class Wuya implements Flyable {
    public static int cnt = 0;

    private int id;
    public Wuya() {
        id = cnt++;
    }

    @Override
    public void fly() {
        System.out.println("乌鸦" + id + "飞了");
    }
}
